(require '[clojure.string :as cs])

(def char-list (vec (slurp "parser.clj")))
;; (println text)
;; (conj cache char)
;; (def char-list (conj char-list char))
;; (for [char char-list] (prn char))
;; define a data structure to show keyword and escape char
;; define a macro to input char-list and return char-list
;; make a new jieshiqi interpreter to run code
(defn escape-char [char-list escape-vec]
  (let [new-char-list []]
    ;; escape-vec
    ;; [ \; :comment \newline ]
    ;; [ \" :string \" ]
    ;; [ \ :char \newline ]
    ;; 
    ))

;; (defn split-comment-and-string [char-list char-map] (comment [:char-map {:name :string :from \" :to \"}]))

;; (defn filter-unused-char-number [char-list] (let [char-map {}] (for [char char-list])))
;; (remove #((set (keep int (vec "string"))) %) (range 1 255)) 
;; 将字符序列转换成字符串
(defn char-list->string [char-list] (clojure.string/join "" char-list))

;; 检测代码中是否有超过126以上的字符，如果有，就报警
(defn check-invalid-char [char-list]
  (if (not-any? #(> % 126) (keep int char-list))
    true
    (println "souce code have invalid char of ASCII code over 126")))

;; (check-invalid-char [\a \b \c (char 127) (char 222)])
;; (println "hello world")
(defn filter-comment [text]
  (for [c (vec text)]
    (cond
      (= c \") (println "met \"")
      (= c 
